package com.mini.admin.openfeign.controller;

import com.mini.admin.api.entity.SysOauthClient;
import com.mini.admin.api.openfeign.AdminOAuthClientOpen;
import com.mini.admin.service.SysOauthClientService;
import com.mini.common.core.result.RestResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Zhou Feng
 */
@RestController
public class AdminOAuthClientOpenController implements AdminOAuthClientOpen {
    @Autowired
    private SysOauthClientService oauthClientService;

    @Override
    public RestResponse<SysOauthClient> getClientByClientId(@RequestParam("clientId") String clientId) {
        return RestResponse.ok(oauthClientService.getClientByClientId(clientId));
    }
}
